package com.yan.demo.demo2;

/**
 * @author taoge
 * @Date 2024/8/8 11:31
 * @Description 死锁的演示
 */
public class Demo2 {
    public static final Object obj1 = new Object();
    public static final Object obj2 = new Object();
    public static void main(String[] args) {
        MyTask1 myTask1 = new MyTask1(obj1 , obj2);
        MyTask2 myTask2 = new MyTask2(obj1 , obj2);
        Thread t1 = new Thread(myTask1);
        Thread t2 = new Thread(myTask2);
        t1.start();
        t2.start();
    }
}
